/**
 * Copyright (c) 2005-2016, yinwer81 (yinwer81@aliyun.com)
 *
 * Licensed under the Apache License, Version 2.0
 */
package com.nozturn.throne.dao;

import java.util.List;

import com.nozturn.throne.entity.Authorization;
import com.nozturn.throne.entity.OAuthInfoDTO;

public interface AuthorizationDao {

    Authorization createAuthorization(final Authorization authorization);

    int updateAuthorization(final Authorization authorization);

    int deleteAuthorization(final String authorizationCode);

    Authorization findOne(final Long pk);

    Authorization findByAuthorizationCode(final String authorizationCode);

    public Authorization findByUserPkAndClientPk(final Long userPk, final Long clientPk);

    List<Authorization> findByAuthorization(final Authorization authorization);
    
    OAuthInfoDTO findAllByAuthorizationCode(final String authorizationCode);

}
